// 获取用户相关工具
class GetUserInfoTool {
    static getIp(req) {
        let ip = req.ip.match(/\d+.\d+.\d+.\d+./).join('.')
        return ip
    }
    //获取用户设备
    static getUseragent(req) {
        return req.headers['user-agent']
    }
}
module.exports = GetUserInfoTool